package me.sdevil507.biz.fruit.po;


import lombok.Data;
import lombok.EqualsAndHashCode;
import me.sdevil507.supports.jpa.BaseJpaSnowflakeIdEntity;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import java.util.Date;

/**
 * @program: tips_back_end
 * @description: 成果作者单位
 * @author: kzl
 * @create: 2020-06-23 16:23
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "biz_fruit_author_org")
@Where(clause="is_del = 0")
public class FruitAuthorOrgPO extends BaseJpaSnowflakeIdEntity {

    /**
     * 单位名称
     */
    @Column
    private String name;

    /**
     * 单位排名
     */
    @Column
    @OrderBy("ranking ASC")
    private int ranking;

    /**
     * 作者id
     */
    @Column
    private Long  authorId;

    /**
     * 智库id
     */
    @Column
    private Long orgId;

    /**
     * 是否删除
     *
     */
    @Column(nullable = false)
    private Boolean  isDel= false;


    /**
     * 创建时间
     */
    @Column
    private Date createTime = new Date();

    /**
     * 更新时间
     */
    @Column
    private Date updateTime = new Date();

    /**
     * 机构单位数量
     */
    @Column
    private String number;
}
